package com.colabo.j2ee.web.oaf.startup;

import javax.servlet.ServletContextEvent;

import org.springframework.web.context.ContextLoaderListener;

import com.colabo.j2ee.web.core.context.CoreInit;

/**
 * Application Startup. Invoked by spring context for loading the 
 * context of the application
 * @author duchongyang
 *
 */
public class ApplicationStartup extends ContextLoaderListener {

	@Override
	public void contextDestroyed(ServletContextEvent event) {
		CoreInit.destroy();
		super.contextDestroyed(event);
	}

	@Override
	public void contextInitialized(ServletContextEvent event) {
		super.contextInitialized(event);
		// 基础部分的初始化
		CoreInit.init(event);
		
		// 基础部分的初始化
		ApplicationInit.init();
	}


}
